package com.zy.db.dal.dto;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;

@Data
public class BasePageQuery extends BaseQuery {


    /**
     * 每页条数
     */
    private long size;
    /**
     * 当前页数
     */
    private long current;

    private Page page;

    public Page getPage() {
        return new Page<>(this.current == 0 ? 1 : this.current, this.size == 0 ? 10 : this.size);
    }
}
